package ioc2;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class IocTest2 {

    public static void main(String[] args) {


       // ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("ioc2.xml");


        ClassPathXmlApplicationContext classPathXmlApplicationContext =
                new ClassPathXmlApplicationContext("ioc.xml");
//        Car car = classPathXmlApplicationContext.getBean(Car.class);
//        car.setName("红旗");
//        car.setPrice(10000);
//        System.out.println(car);
        Object user1 = classPathXmlApplicationContext.getBean("user");

        System.out.println(user1);

    }
}
